# https://www.bilibili.com/video/BV1W7411G7wP?p=13&spm_id_from=pageDriver&vd_source=8bd7b24b38e3e12c558d839b352b32f4
import pandas as pd
import matplotlib.pyplot as plt

orders = pd.read_excel('../resources/input_py_tools/013/Orders.xlsx', index_col='Week')
print(orders)
print(orders.columns)
# ['Accessories', 'Bikes', 'Clothing', 'Components', 'Grand Total']

# 折线图
#orders.plot(y=['Accessories', 'Bikes', 'Clothing', 'Components'])
# 叠加区域图
orders.plot.area(y=['Accessories', 'Bikes', 'Clothing', 'Components'])
# 回忆 叠加柱状图
#orders.plot.bar(y=['Accessories', 'Bikes', 'Clothing', 'Components'], stacked=True)


plt.title('Sales Weekly Trend', fontsize=16, fontweight='bold')
plt.ylabel('Total', fontsize=12, fontweight='bold')
plt.xticks(orders.index, fontsize=8)
plt.show()


